/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package abricots.game;

import abricots.game.state.ConnectingState;
import abricots.game.state.TestState;
import abricots.net.GameClient;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

/**
 *
 * @author charly
 */
public class MainGame extends StateBasedGame {
   public MainGame() {
      super("abricots");
   }

   @Override
   public void initStatesList(GameContainer container) throws SlickException {
      GameEnv env = new GameEnv();
      env.init();
      GameClient client = new GameClient();

      ConnectingState connectingState = new ConnectingState(env, client);
      TestState state = new TestState(env, client);
      addState(connectingState);
      addState(state);
   }
}
